package demo1;

public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.creatTree();
        int count = binaryTree.getLeveNodeCount(root,2);
        System.out.println(count);
    }
    public static void main3(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.creatTree();
        binaryTree.getLeafCount(root);
        System.out.println(BinaryTree.leafCount);
    }
    public static void main2(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.creatTree();
        binaryTree.size(root);
        System.out.println("节点的个数为： " + BinaryTree.NodeCount);
        System.out.println(binaryTree.nodeSize(root));
    }
    public static void main1(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.creatTree();
        binaryTree.preOrder(root);
        System.out.println();
        binaryTree.inOrder(root);
        System.out.println();
        binaryTree.postOrder(root);
    }
}
